/*
 *  Copyright (c) 2011 Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany.
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the GNU Lesser Public License v2.1
 *  which accompanies this distribution, and is available at
 *  http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *
 *  Contributors:
 *      Leibniz Institute of Plant Genetics and Crop Plant Research (IPK), Gatersleben, Germany - RMI Client, FileChooser and WebDAV
 */
package de.ipk_gatersleben.bit.bi.edal.webdav.wrapper.metadata;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class IdentifierRelationWrapper {
	private IdentifierWrapper[] IdentifierRelation;
	
	public IdentifierRelationWrapper() {}
	
	public IdentifierRelationWrapper(de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.IdentifierRelation idr) {
		de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.Identifier[] ids = new de.ipk_gatersleben.bit.bi.edal.primary_data.metadata.Identifier[idr.size()];
		idr.toArray(ids);
		this.IdentifierRelation = new IdentifierWrapper[ids.length];
		
		for(int i = 0; i <= ids.length - 1; i++) {
			this.IdentifierRelation[i] = new IdentifierWrapper(ids[i]);
		}
	}

	public IdentifierWrapper[] getIdentifierRelation() {
		return IdentifierRelation;
	}

	public void setIdentifierRelation(IdentifierWrapper[] IdentifierRelation) {
		this.IdentifierRelation = IdentifierRelation;
	}
}
